function handles = deleteCell(handles)
% deleteCell
%
% Editing:
% gs may 2005
% -----------------------------------------------

% determine which cell was selected
cellVal = get(handles.cellList, 'Value');

% determine which group is also selected
groupVal = get(handles.groupList, 'Value');

% delete from cell listbox
cellIDs = get(handles.cellList, 'String');
numCells = size(cellIDs, 1);

cellIDs(cellVal) = [];
set(handles.cellList, 'String', cellIDs);
if cellVal == numCells
    set(handles.cellList, 'Value', cellVal-1);
end

% delete from handles
% listsAndExpts = handles.analysis.mapAverager.cellLists.currentFile.listsAndExpts{groupVal,2}(cellVal) % = [];
handles.analysis.mapAverager.cellLists.currentFile.listsAndExpts{groupVal,2}(cellVal) = [];


handles = saveListFile(handles);
